<template>
  <div>
  <div class="line"></div>
    <el-menu :router="true" :default-active="$route.matched[1].path" class="el-menu-demo" mode="horizontal"
        @select="handleSelect" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
        <el-menu-item index="/nav/sys">智信为学</el-menu-item>
        <el-menu-item index="/nav/firstPage">首页</el-menu-item>
        <el-menu-item index="/nav/user">用户管理</el-menu-item>
          <el-button type="primary" icon="el-icon-edit" round class="quit">退出登录</el-button>
    </el-menu>
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
    
    };
  },
  methods: {
    handleSelect(key, keyPath) {
     this.$router.push(key)
    }
  },
  mounted(){
    console.log(this.$route)
    // console.log(this.$router.matched[0])
  }
};
</script>
<style>
* {
  margin: 0;
  padding: 0;
}
.quit{
  float:right;
  margin: 14px 10px 0 0;
}
</style>



